Precision machine vision inspection systems (or “vision systems” in short) can be utilized to obtain precise dimensional measurements of inspected objects and to inspect various other object characteristics. Such systems may include a computer, a camera and optical system, and a precision stage that is movable in multiple directions so as to allow the camera to scan the features of a workpiece that is being inspected. One exemplary prior art system that is commercially available is the QUICK VISION® series of PC-based vision systems and QVPAK® software available from Mitutoyo America Corporation (MAC), located in Aurora, Ill. The features and operation of the QUICK VISION® series of vision systems and the QVPAK® software are generally described, for example, in the QVPAK 3D CNC Vision Measuring Machine User's Guide, published January 2003, and the QVPAK 3D CNC Vision Measuring Machine Operation Guide, published September 1996, each of which is hereby incorporated by reference in their entirety. This product, as exemplified by the QV-302 Pro model, for example, is able to use a microscope-type optical system to provide images of a workpiece at various magnifications, and move the stage as necessary to traverse the workpiece surface beyond the limits of any single video image.
Accuracies in the micron range are often desired in such systems. Z-height measurements (along the optical axis of the camera system) are generally derived from a “best focus” position. The level of precision and reliability achieved for Z-height measurements is often less than that achieved for other measurement axes. It would be desirable for a machine vision inspection system to be able to obtain Z-height measurements with improved accuracy and reliability. Furthermore, in certain machine vision inspection systems, an autofocus tool may be utilized to obtain the best focus position and the resulting Z-height measurement. It would be desirable for an autofocus tool to operate automatically with improved accuracy and reliability. The present application is directed to providing a system and method that can overcome the foregoing and other disadvantages.